package recursion;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-06-02 21:42
 * @ Description :
 */
public class Cases
{
    public static void main(String[] args)
    {
        print(4);
        //System.out.println(factorial(4));
    }

    public static void print(int n)
    {
        if (n > 2)
        {
            print(n + 1);
            System.out.println("n = " + n);
        }
    }

    public static int factorial(int n)
    {
        if (n == 1)
        {
            return 1;
        }
        else
        {
            return factorial(n - 1) * n;
        }
    }


}
